package com.appkubes.mall.restful.application.brand.goods.controller;

import com.appkubes.cloud.config.params.paramValid.ParamValid;
import com.appkubes.common.Response;
import com.appkubes.mall.core.controller.BaseMallBrandGoodsController;
import com.appkubes.mall.restful.application.brand.goods.entity.vo.GoodsListVO;
import com.appkubes.mall.restful.application.brand.goods.service.BrandGoodsService;
import com.appkubes.mall.restful.application.goods.taobao.entity.dto.GoodsTaobaoListDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Lin Jiaming
 * @Date: 2020/3/7 13:12
 * @Description:
 */
@Api(tags = "品牌商品模块")
@RestController
@RequestMapping("/brand/goods")
public class BrandGoodsController extends BaseMallBrandGoodsController {

    @Autowired
    BrandGoodsService brandGoodsService;

    @ApiOperation("品牌商品列表")
    @GetMapping("/goodsList")
    public Response goodsList(@ParamValid GoodsListVO goodsListVO){
        List<GoodsTaobaoListDto> goodsList = brandGoodsService.goodsList(goodsListVO);

        return Response.success(goodsList);
    }
}
